<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!-- import CSS -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
  <div id="app">
    <el-upload
        class="avatar-uploader"
        action="https://jsonplaceholder.typicode.com/posts?id=123"
        :show-file-list="false"
        :on-success="handleAvatarSuccess">
        <el-link type="primary">主要链接</el-link>
    </el-upload>
  </div>
</body>

  <!-- import Vue before Element -->
  <script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
  <!-- import JavaScript -->
  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <script>
    new Vue({
        el: '#app',
        data() {
        return {
          
        };
        },
        methods: {
            handleAvatarSuccess(res, file) {
                this.imageUrl = URL.createObjectURL(file.raw);
            },
        
        }
    })
  </script>
</html>